package com.itheima.mapper;

import com.itheima.pojo.Member;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMemberMapper {
    /**
     * 查询用户是否存在
     * @param telephone
     * @return
     */
    @Select("select *from members where phoneNumber=#{telephone}")
    Member memberExit(String telephone);

    /**
     * 创建新用户
     * @param addMember
     */
     void insertMember(Member addMember);

    /**
     * 根据id查询
     * @param checkid
     * @return
     */
    @Select("select *from members where id =#{checkid}")
    Member findById(Integer checkid);
}
